#!/usr/bin/env node

const http = require('http')
const fs = require('fs')
const os = require('os')

http
  .createServer((req, res) => {
    let url = req.url
    res.setHeader('Content-Type','text/html;charset=utf-8')
    res.write('req.url：' + url)
    res.end('\n<h1>Hello World<h1>')
})
  .listen(8080, () => {
    console.log('Server is listening')
})    
